home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / VISCAFE.BIN / VPOJAVA.DLL / SOURCE / ATTENTION_DIALOG < prev    next >
Encoding:
Text File  |  1997-06-19  |  1.5 KB  |  56 lines

  1. import java.awt.*;
  2. import java.awt.Button;
  3. import java.awt.Frame;
  4. import java.awt.Insets;
  5. import java.awt.Label;
  6. import java.awt.FlowLayout;
  7. import java.net.URL;
  8. import symantec.itools.multimedia.ImageViewer;
  9. import symantec.itools.awt.util.dialog.ModalDialog;
  10.  
  11. public class AttentionDialog extends ModalDialog {
  12.  
  13.     public AttentionDialog(Frame parent, String title, String message, URL iconURL) {
  14.         super(parent, title);
  15.  
  16.         //{{INIT_CONTROLS
  17.         setLayout(new FlowLayout(FlowLayout.LEFT,5,5));
  18.         addNotify();
  19.         resize(insets().left + insets().right + 270,insets().top + insets().bottom + 73);
  20.         label1 = new java.awt.Label("");
  21.         label1.reshape(insets().left + 5,insets().top + 5,14,21);
  22.         add(label1);
  23.         okButton = new java.awt.Button("OK");
  24.         okButton.reshape(insets().left + 24,insets().top + 5,26,21);
  25.         add(okButton);
  26.         setTitle("");
  27.         //}}
  28.  
  29.         label1.setText(message);
  30.         if (iconURL != null) {
  31.             ImageViewer img = new ImageViewer(iconURL);
  32.             add(img);
  33.         }
  34.     }
  35.  
  36.     public AttentionDialog(Frame parent) {
  37.         this(parent, "Attention", "Event", null);
  38.     }
  39.  
  40.     // Add a constructor for Interactions (ignoring modal)
  41.     public AttentionDialog(Frame parent, boolean modal) {
  42.         this(parent);
  43.     }
  44.  
  45.     // Add a constructor for Interactions (ignoring modal)
  46.     public AttentionDialog(Frame parent, String message, boolean modal) {
  47.         this(parent, "Attention", message, null);
  48.     }
  49.  
  50.     //{{DECLARE_CONTROLS
  51.     java.awt.Label label1;
  52.     java.awt.Button okButton;
  53.     //}}
  54. }
  55.  
  56.